const findWidget = (widgets, targetCid, targetAttr)=>{
  var target = null
  widgets.some(widget=>{
    if (widget.cid === targetCid) {
      target = widget.common[targetAttr]
      return true
    }else{
      target = findWidget(widget.children, targetCid, targetAttr)
      return Boolean(target)
    }
  })
  return target
}
export default findWidget